None
This is the validation notebook that displays the unit tests for the Resample step in calwebb_image2 and calwebb_spec2. This notebook runs and displays the unit tests that are performed as a part of the normal software continuous integration process. For more information on the pipeline visit the links below.
Pipeline description: https://jwst-pipeline.readthedocs.io/en/latest/jwst/resample/index.html
Pipeline code: https://github.com/spacetelescope/jwst/tree/master/jwst/
JWST unit tests are located in the "tests" folder for each pipeline step within the GitHub repository, e.g., jwst/resample/tests.
These are terms or acronymns used in this notebook that may not be known a general audience.
JWST: James Webb Space Telescope
NIRCam: Near-Infrared Camera
Unit testing is a software testing method by which individual units of source code are tested to determine whether they are working sufficiently well. Unit tests do not require a separate data file; the test creates the necessary test data and parameters as a part of the test code.
Data used for unit tests is created on the fly within the test itself, and is typically an array in the expected format of JWST data with added metadata needed to run through the pipeline.
import os
if 'CRDS_CACHE_TYPE' in os.environ:
if os.environ['CRDS_CACHE_TYPE'] == 'local':
os.environ['CRDS_PATH'] = os.path.join(os.environ['HOME'], 'crds', 'cache')
elif os.path.isdir(os.environ['CRDS_CACHE_TYPE']):
os.environ['CRDS_PATH'] = os.environ['CRDS_CACHE_TYPE']
print('CRDS cache location: {}'.format(os.environ['CRDS_PATH']))
CRDS cache location: /tmp/crds_cache
import tempfile
import os
import pytest
import jwst
from IPython.display import IFrame
from IPython.core.display import HTML